package com.sfddata.musicpillow.user.entity;

import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;

import java.io.Serializable;
import java.util.Date;
import java.util.List;

import lombok.Data;
import lombok.NoArgsConstructor;

/**
 * 
 * 
 * @author jyo
 * @email 820389501@qq.com
 * @date 2022-11-02 15:29:15
 */
@Data
@TableName("tb_sleep_record")
@NoArgsConstructor
public class TbSleepRecordEntity implements Serializable {
	private static final long serialVersionUID = 1L;

	/**
	 *
	 */
	@TableId
	private Long id;
	/**
	 * 用户ID
	 */
	private String colUserId;
	/**
	 * 开始睡眠时间
	 */
	private String colStartSleepTime;
	/**
	 * 结束睡眠时间
	 */
	private String colEndSleepTime;
	/**
	 * 入睡时间
	 */
	private String colAsleepTime;
	/**
	 * 日期
	 */
	private String colDate;
	/**
	 * 睡眠评分
	 */
	private String colScore;
	/**
	 * 睡眠总时长（分钟）
	 */
	private String colSleepDuration;
	/**
	 * 在床时间
	 */
	private String colBedDuration;
	/**
	 * 睡眠数据
	 */
	private String colSleepData;
	/**
	 * 深睡时长
	 */
	private String colDeepDuration;
	/**
	 * 浅睡时长
	 */
	private String colLightDuration;
	/**
	 * 清醒时长
	 */
	private String colAwakeDuration;
	/**
	 * 音频检测数据
	 */
	private String colAudioData;
	/**
	 * 异常数据
	 */
	private String colAbnormalAudioData;
	/**
	 * 打鼾次数
	 */
	private String colSnoreNum;
	/**
	 * 呼吸暂停次数
	 */
	private String colApneaNum;
	/**
	 * 干预次数
	 */
	private String colInterventionNum;
	/**
	 * 有效干预次数
	 */
	private String colEffectiveInterventionNum;
	/**
	 * 生成报告所在时区
	 */
	private String colCreateZone;
	/**
	 * 创建时间
	 */
	private String createDate;
	/**
	 *
	 */
	private String colIsDelete;
	/**
	 * 睡眠潜伏时长
	 */
	private String latencyOfSleep;
	/**
	 * 睡眠状态值
	 */
	private String sleepState;
	/**
	 * 睡眠曲线
	 */

	private String sleepCurve;
	/**
	 * 呼吸暂停列表
	 */
	private String apneaList;
	/**
	 * 分贝列表
	 */
	private String dbList;
	/**
	 * 鼾声时长
	 */
	private String snoreTime;

	private Integer isRead;

	public TbSleepRecordEntity(String nowDate) {
		this.colDate = nowDate;
	}

	public TbSleepRecordEntity(String userId, String goToBedTime, String getUpTime, String s, String nowDate,
							   String sleepScore, String sleepTime, String bedTime, String deepSleep, String shallowSleep,
							   String wakingTime, String s1, String s2, int size, int size1, String snoreInterveneCount,
							   String snoreInterveneSuccessCount, String s3,
							   String latencyOfSleep, List<String> sleepState, List<Curve> sleepCurve, List<String> apneaList,
							   List<String> dbList,String snoreTime
	) {
		this.colUserId = userId;
		this.colStartSleepTime = goToBedTime;
		this.colEndSleepTime = getUpTime;
		this.colAsleepTime = s;
		this.colDate = nowDate;
		this.colScore = sleepScore;
		this.colSleepData = null;
		this.colSleepDuration = sleepTime;
		this.colBedDuration = bedTime;
		this.colDeepDuration = deepSleep;
		this.colLightDuration = shallowSleep;
		this.colAwakeDuration = wakingTime;
		this.colAudioData = s1;
		this.colAbnormalAudioData = s2;
		this.colSnoreNum = String.valueOf(size);
		this.colApneaNum = String.valueOf(size1);
		this.colInterventionNum = snoreInterveneCount;
		this.colCreateZone = s3;
		this.latencyOfSleep = latencyOfSleep;
		this.sleepState = sleepState.toString();
		this.sleepCurve = sleepCurve.toString();
		this.apneaList = apneaList.toString();
		this.dbList = dbList.toString();
		this.snoreTime = snoreTime;
	}
}
